#ifndef _ACTIONS_H
#define _ACTIONS_H

#include <stdarg.h>
#include "synq.h"

#include "status_tree.h"

typedef enum {
    AT_NOP,
    AT_SYNC,
    AT_DEL,
    NUM_AT
} eAT;

extern char *AT_NAMES[];

typedef struct {
    char *file;
    unsigned int dir;
} sAT_sync;

typedef struct {
    char *file;
} sAT_del;

typedef struct {
    eAT type;

    union {
        sAT_sync sync;
        sAT_del del;
    };
} sA;

int     A_init_v    (sA *action, eAT type, va_list ap);
int     A_run_simu  (sA *action, sSynq *synq);
void    A_deinit    (sA *action);

void    A_print     (sA *action);

#endif

